package com.xiaochangwei.web.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import com.xiaochangwei.web.beans.User;
import com.xiaochangwei.web.beans.UserInfo;

/**
 * @since 2017年1月5日 上午10:58:26
 * @author 肖昌伟 317409898@qq.com
 * @description
 */
@Repository
public interface UserDao {
	public User getUserByName(String user);

	public void updateLoginCount(User user);

	public void insertUser(User user);

	public UserInfo getUserInfo(Long userId);

	public void insertUserInfo(UserInfo userInfo);

	public void updateUserInfo(UserInfo userInfo);

	public void deleteUserHobby(Long userId);

	public void addUserHobby(@Param("userId") Long userId, @Param("hobbyId") Long hobbyId);

	public void updateUserContact(UserInfo userInfo);

	public UserInfo getUserContact(@Param("userId") Long userId);

	public void updatePm(@Param("userId") Long userId, @Param("pm") Integer pm);
}
